Skip to content

sync-branches: configure git credentials before merge/push step#30

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/configure-git-credentials-before-merge
Draft

sync-branches: configure git credentials before merge/push step#30
Copilot wants to merge 2 commits intomainfrom
copilot/configure-git-credentials-before-merge

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

The sync-branches workflow runs git merge and git push without prior git identity or authenticated remote configuration, causing failures when the default checkout environment lacks these.

  • Add GITHUB_TOKEN env var (from github.token) to the step
  • Configure user.name/user.email as github-actions[bot] before the merge script
  • Set authenticated remote URL via x-access-token scheme before fetch/push
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"

Follows the same credential pattern already used in workflows/autoloop.md.

Add git identity (user.name, user.email) and authenticated remote URL
configuration before the Node.js merge script runs. Without these,
merge commits fail when git identity is not set, and push/fetch
operations fail when the remote URL lacks authentication.

Follows the same pattern used in workflows/autoloop.md for token-based
authentication via GITHUB_TOKEN env var.

Agent-Logs-Url: https://github.com/githubnext/autoloop/sessions/2ca3528c-1a17-4fba-9bc7-76da39c33eb9

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure git credentials before merge and push step sync-branches: configure git credentials before merge/push step Apr 4, 2026
Copilot AI requested a review from mrjf April 4, 2026 05:06
Copilot finished work on behalf of mrjf April 4, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sync-branches: configure git credentials before merge/push step

2 participants